Programmed Input/Output Mode

ABSTRACT

A data processing system and method are provided. A host computing device comprises at least one processor. A network interface device is arranged to couple the host computing device to a network. The network interface device comprises a buffer for receiving data for transmission from the host computing device. The processor is configured to execute instructions to transfer the data for transmission to the buffer. The data processing system further comprises an indicator store configured to store an indication that at least some of the data for transmission has been transferred to the buffer wherein the indication is associated with a descriptor pointing to the buffer.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a Continuation of of U.S. application Ser. No. 14/073,735, filed Nov. 6, 2013, entitled “PROGRAMMED INPUT/OUTPUT MODE” (Atty. Docket No. LVL5 2040-1). The above application is incorporated herein in its entirety

BACKGROUND

The present application relates to coupling a host device to a network and in particular but not exclusively to the provision of data transfer from the host device to the network.

SUMMARY

According to a first aspect of the present application, there is provided a data processing system comprising: a host computing device comprising at least one processor; a network interface device arranged to couple the host computing device to a network, the network interface device comprising a buffer for receiving data for transmission from the host computing device; wherein the processor is configured to execute instructions to transfer the data for transmission to the buffer; and the data processing system further comprises: an indicator store configured to store an indication that at least some of the data for transmission has been transferred to the buffer wherein the indication is associated with a descriptor pointing to the buffer.

The buffer may be a scratch pad memory. The data processing system may further comprise one or more further buffers; wherein the buffer and one or more further buffers form a plurality of buffers each associated with an address space of the host computing device.

A descriptor may be configured to point to one of the plurality of buffers. A descriptor may be further configured to identify an offset within the buffer to which transferred data is written. The instructions may comprise register store operations to at least one non-cached input/output memory address. The processor may be configured to execute load/store operations to transfer the data to the buffer. The at least one processor may be configured to transfer the data to the buffer using programmed input/output.

The host computing device may be configured to support an operating system running one or more applications. The host computing device may be configured to support a hypervisor driver context. Each of the one or more applications may comprise one or more user-level processes.

The data to be transmitted may comprise at least part of a data transmission unit. The buffer may be a buffer of a size of one or more data transmission units. The data transmission unit may be a data frame. The buffer may be a template comprising one or more fields. The fields may comprise a header field and a payload field.

The data for transmission may comprise first data and may be transferred in a first data transfer and the data processing system may be configured to transfer one or more further data for transmission in one or more further data transfers. For each of the first and one or more data transfers the indicator may comprise a respective descriptor.

The data processing system may further comprise: a descriptor ring for storing one or more descriptors for one or more data transfers, each descriptor pointing to the respective data transfer in the buffer. The indicator store may be configured to store a descriptor for a first data transfer to the buffer and thereafter indications referencing the descriptor ring for subsequent data transfers to the buffer.

The descriptor ring may be further configured to store a command for the network interface device.

The processor may be configured to execute instructions to transfer the data for transmission to the buffer according to a first mode and the data processing system may be further configured to transfer data according to a second mode. The second mode may comprise a direct memory access mode of data transfer. In the second mode the data processing system may be configured to write a descriptor to the descriptor ring, the descriptor pointing to a buffer of the host processing device in which data for transfer is stored. The descriptor ring may store descriptors in accordance with a first mode and descriptors in accordance with the second mode in an order in which the data transfers associated with the respective descriptors were carried out.

The indication may be a doorbell. The network interface device may be configured to fetch a first descriptor from the indicator store and subsequent descriptors from a descriptor ring. The network interface device may be configured to fetch a descriptor from the descriptor ring in response to an indication in the indicator store.

According to a second aspect, there is provided a method comprising: coupling a host computing device to a network by a network interface device; transferring data from the host computing device to a buffer of the network interface by executing instructions by a processor of the host computing device to transfer the data for transmission; and storing an indication that at least some of the data for transmission has been transferred to the buffer wherein the indication is associated with a descriptor pointing to the buffer.

The buffer and one or more further buffers may form a plurality of buffers and the method may further comprise associating each of the plurality of buffers with an address space of the host computing device. The method may further comprise executing load/store operations to transfer the data to the buffer. The method may further comprise transferring the data to the buffer using programmed input/output.

The method may further comprise supporting by the host computing device an operating system running one or more applications. The method may further comprise supporting by the host computing device a hypervisor driver context. The data for transmission may comprise first data and the method may further comprise transferring the first data in a first data transfer and transferring one or more further data for transmission in one or more further data transfers.

The method may further comprise storing in a descriptor ring one or more descriptors for one or more data transfers, each descriptor pointing to the respective data transfer in the buffer. The method may further comprise storing a descriptor for a first data transfer to the buffer and thereafter storing indications referencing the descriptor ring for subsequent data transfers to the buffer.

The method may further comprise storing a command for the network interface device in a descriptor ring.

The method further comprising executing instructions to transfer the data for transmission to the buffer according to a first mode; and transfer ring data according to a second mode. The method may further comprise writing a descriptor pointing to a buffer of the host processing device in which data for transfer according to the second mode is stored. The method may further comprise storing descriptors in accordance with a first mode and descriptors in accordance with the second mode in an order in which the data transfers associated with the respective descriptors were carried out.

The method may further comprise fetching a first descriptor from the indicator store and fetching subsequent descriptors from a descriptor ring. The method may further comprise fetching a descriptor from the descriptor ring in response to an indication in the indicator store.

According to a third aspect, there is provided an apparatus comprising: at least one processor configured to execute instructions to transfer data for transmission to a buffer of a network interface device; and an indicator store configured to store an indication that at least some of the data for transmission has been transferred to the buffer; wherein the indication is associated with a descriptor pointing to the buffer.

According to a fourth aspect, there is provided a method comprising: executing instructions to transfer data for transmission to a buffer of a network interface device; and storing an indication that at least some of the data for transmission has been transferred to the buffer; wherein the indication is associated with a descriptor pointing to the buffer.

According to a fifth aspect, there is provided an apparatus configured to couple a host computing device to a network, the apparatus comprising: a buffer for receiving data for transmission from the host computing device, the data for transmission being transferred to the network interface by instructions executed by a processor of the host computing device; and an access to an indicator store configured to store an indication that at least some of the data for transmission has been transferred to the buffer wherein the indication is associated with a descriptor pointing to the buffer.

According to a sixth aspect, there is provided a method comprising: coupling a host computing device to a network; receiving data for transmission from the host computing device, the data for transmission being transferred to the network interface by instructions executed by a processor of the host computing device; and accessing an indication that at least some of the data for transmission has been transferred to the buffer; wherein the indication is associated with a descriptor pointing to the buffer.

According to a seventh aspect, there is provided a method comprising: monitoring data being transmitted onto a network; detecting a delay in the transmission of the data; and inserting invalid check data into the data.

The data being transmitting onto the network may be a data transmission unit. A delay in the transmission may be detected when a first part of the data transmission unit has been transmitted onto the network. The method may further comprise inserting invalid check data into a tail of the first part of the data transmission unit.

The data transmission unit may be truncated by transmitting only the first part of the data transmission unit when the delay is detected.

The method may further comprise: storing the first part of the data transmission unit; and retransmitting the data transmission unit when a second part of the data transmission unit is received.

The invalid check data may be invalid checksum data for the data. The check data may be a cyclic redundancy check. The check data may be a frame check sequence checksum.

According to an eighth aspect, there is provided an apparatus comprising: a monitor configured to monitor data being transmitted onto a network and detect a delay in the transmission of the data; and wherein when a delay is detected, the monitor is further configured to insert invalid check data into the data being transmitted.

The data being transmitting onto the network may be a data transmission unit. A delay in the transmission may be detected when a first part of the data transmission unit has been transmitted onto the network. The invalid check data may be inserted into a tail of the first part of the data transmission unit.

The apparatus may further comprise: a memory configured to store the first part of the data transmission unit; wherein the monitor is further configured to retransmit the data transmission unit when a second part of the data transmission unit is received.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 is a schematic diagram of a data processing system in which embodiments of the present application may be implemented;

FIG. 2 is a conceptual diagram of a data processing system implementing a direct memory access mode;

FIG. 3 is a conceptual diagram of a data processing system implementing a programmed input/output mode;

FIG. 4 is a conceptual diagram of a dual mode data processing system;

FIG. 5 is a schematic diagram of a data processing system in which a second embodiment may be implemented;

FIG. 6 is a flow diagram depicting the method steps in accordance with one example of the second embodiment;

FIG. 7 is a conceptual diagram of a data processing system implementing multicast flow replication;

FIG. 8 is a conceptual diagram of a data processing system implementing a further aspect of multicast flow replication;

FIG. 9 is a conceptual diagram of a data processing system implementing address translation services; and

FIG. 10 is a conceptual diagram of a data processing system supporting guest operating systems.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled in the art to make and use aspects of the present application, and is provided in the context of a particular application. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art.

The general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.

The present application relates to a host computing device and network interface device that together may comprise a data processing system. A host computing device could be any kind of computing device, including for example: a server, a personal computer, a switch, a router, a bridge, a virtualised system (e.g. a virtualised operating system and the applications it supports), and a portable device such as a tablet computer or smartphone.

A network interface device could be any hardware device configured to interface a wired or wireless network to a host computing device. The network interface device could be provided in any manner between a network and host device, including: as one or more peripheral devices (such as a peripheral component interconnect express (PCIe) card) of the host computing device, and/or as an integral part of the host computing device (e.g. a local area network (LAN) on mainboard, or LAN on motherboard (LOM) chipset).

A data processing system in which some embodiments may be implemented is shown in FIG. 1. The data processing system 100 comprises a host computing device 101 coupled to a network interface device 102 that is arranged to interface the host to network 103. The host computing device may include an operating system 104 supporting one or more applications 106 and a network protocol stack.

It will be appreciated that the operating system may take various forms, for example the operating system could be a conventional monolithic operating system, a privileged domain (e.g. a hypervisor) supporting one or more virtualised operating systems, or a virtualised operating system itself. In some embodiments, there could therefore be multiple software environments at the host computing device.

The host computing device 101 may comprise one or more central processing units (CPU) and a one or more memories. In some embodiments, the host computing device 101 and the network interface device 102 may communicate via a bus, for example a peripheral component interconnect express (PCIe bus).

During operation of the data processing system, data to be transmitted onto the network may be transferred from the host computing device to the network interface device for transmission.

One method of transferring data for transmission is direct memory access (DMA). In DMA, data in a memory associated with or residing on a host computing device may be transferred to a hardware subsystem, for example a network interface device directly without having to use the CPU of the host computing device. For example a user level process running on the host computing device may generate data to be transmitted over the network. This data to be transmitted may be transferred to the network interface device for transmission using DMA.

FIG. 2 shows an example of a direct memory access mode of operation.

FIG. 2 is a conceptual diagram of a host computing device and a network interface device 220 carrying out DMA. In FIG. 2, a user level process 210 running on the host computing device, may have access to packet buffers 211, transmit descriptor ring 212 and doorbells 213. It will be appreciated that the packet buffer 211, transmit descriptor ring 212 and doorbells 213 may be represented by data structures in a memory. The network interface device 220 may comprise a processing pipeline 221 as well as an access to the doorbells 213.

When a user level process has data to transmit, packets of the data to be transmitted are written to the packet buffers 211. The packet buffers 211 may be mapped to the address space of software operating on the host, for example a user level process, operating system and/or hypervisor driver context, as well as being input/output mapped to the network interface device (for example via an input/output memory management unit (IOMMU) device).

In this manner, the network interface device may access the data packets stored in the packet buffers 211 through the input/output mapping. The construction of data packets in the packet buffers 211 is shown at step 1 in FIG. 2.

At step 2, the user level process writes a descriptor to the descriptor ring 212. The descriptor is a pointer to the packet buffer 211 into which the data to be transmitted has been written. The descriptor ring 212 may be written to with descriptors to indicate that the packet buffer 211 pointed to by the descriptor holds data packets for transmission. The packet buffers 211 may be in a private address space that is accessible to the user level process (for example to write the packet data) and to the network interface.

At step 3 a doorbell is rung. The doorbell is rung by writing a doorbell to the doorbells 213. The user level process writes a doorbell to the doorbells 213 indicating that one or more descriptors are available for reading in the descriptor ring 212. The doorbell may identify the descriptor ring, for example descriptor ring 212, which needs to be serviced. For example this may identify that a descriptor or pointer has been written to the descriptor ring. In some embodiments, the doorbell may comprise further information such as including the first descriptor of the descriptor ring. The inclusion of the first descriptor on the ring may allow the network interface device 220 to use that descriptor without having to pull it from the descriptor ring 212.

In some embodiments, the doorbells are in an area of memory 222 belonging to the network interface device 220 and memory mapped to the address space of the user level process 210. In this example, the user level process writing the doorbells 213 effects a write of the doorbell to a doorbell area of memory 222 of the network interface device. The doorbell may be written through a non-cached memory mapping.

While the foregoing has exemplified memory mapping, it will be appreciated that the network interface 220 may have access to regions of memory holding the packet buffers 211, descriptor ring 212 and doorbells 213.

The network interface device may schedule the descriptor ring and (if necessary) read the relevant descriptors in response to the doorbell. For example, if the doorbell does not include the first descriptor, the network interface device will read the descriptor ring. However, if the doorbell does include the first descriptor, the network interface device may not read the descriptor ring.

When the network interface device has accessed the descriptor (by reading the descriptor ring or through the doorbell), the network interface device can read the data packets in the packet buffers 211 pointed to by that descriptor. The data packets in the data packet buffer 211 may be read by pulling the data from the data packet buffers 211 using direct memory access.

The data packets may be stored for example in the processing pipeline 221 where the network interface device may process the packet data for transmission. For example, in some embodiments, the data packets may be used to form frames and/or lower layer protocol processing may be carried out on the packets to prepare them for transmission over the network. In one example protocol such as transmission control protocol over internet protocol (TCP/IP) checksum offloads may be carried out in the processing pipeline 221.

As can be seen in relation to FIG. 2, in DMA the data to be transmitted is identified using the descriptor ring and doorbell write, however, the actual data transfers are handled asynchronously by the network interface device. In other words, the CPU of the host computing device need not carry out the data transfers but may indicate to the network interface device which data is to be transferred by the network interface device.

The foregoing has given the use of an IOMMU as an example. In other embodiments a buffer table may be implemented. A buffer table may be used to provide an address protection mechanism. In this case, the network interface may translate addresses posted onto the descriptor rings into PCIe bus addresses. This way an unprivileged process would not have access to physical addresses. This step may be made redundant through use of an IOMMU device (which will perform the address translation). In this example, the buffer table may be associated with a specific transmit descriptor ring 212. For example, some entries of the buffer table may be associated with the transmit descriptor ring 212. The private address space of the packet buffers 211 may be accessible to the buffer tables associated with the descriptor ring 212.

Using direct memory access may be suited for the transfer of large amounts of data as the network interface is able to pull data from the host memory without the host CPU having to execute load/store instructions. However, in some cases, DMA may incur a latency. Programmed input/output (PIO) offers an alternative to DMA in some embodiments of data transfer to a network interface. In PIO, a host CPU may execute instructions to transfer data from the host to the network interface. In some cases these instructions may be register store operations to a non-cached memory.

Some embodiments of the present application may implement programmed input/output (PIO) in order to transfer data from the host computing device to a peripheral device such as the network interface controller. In the below examples PIO is sometimes described in relation to a user level context, however it will be appreciated that it may be associated with other software supported by the host computing device, for example a user level application, thread or process, an operating system and/or a hypervisor driver context.

In some aspects of these embodiments, PIO may be implemented as the primary or only mode of transfer. In other aspects, PIO may be implemented in conjunction with DMA when transferring data from the host computing device to the network interface device. In these embodiments, the DMA data transfer may be carried out similarly to that described in relation to FIG. 2.

It will be appreciated that in embodiments, DMA transfers and PIO transfers may have different characteristics and the type of transfer to be used may be selected in dependence on the required characteristics. For example, in some embodiments, PIO transfers may incur a lower latency than DMA transfers and may for example be selected to carry out the transfer of time sensitive data. In a further or alternative example, DMA may have the capability of transferring larger amounts of data and may be selected when a larger amount of data is to be transferred.

In embodiments PIO transfer may be carried by writing data to be transferred to a template on the network interface device using PIO. In other words the data may be transferred to the template by operations carried out by the host computing device CPU. For example, through load/store operations carried out by the host computing device CPU over a bus between the host computing device and the network interface device. This may differ from DMA where memory accesses may be carried out while bypassing the host CPU.

In the implementation of PIO, a descriptor ring and/or doorbell may be used to indicate that data is available for transmission. The host computing device may indicate to the network interface device that data is available in the template by writing a descriptor to a descriptor ring and/or a doorbell. The descriptor may point to the template of the network interface device to which the data was written.

In some embodiments, both a descriptor ring and a doorbell may be implemented, for example a doorbell may be an indicator that data is available, a first descriptor of a data transfer may be written to the doorbell in some embodiments to avoid the latency of a first access to the descriptor ring. In other or further embodiments, the functionality of the descriptor ring and the doorbell may be combined. For example, descriptors may be written to a queue which serves to indicate that data is available as well as provide a descriptor pointing to that data.

The network interface device may receive an indication that data is available in a template (either through the doorbell or the descriptor ring or both) and process the data in the template for transmission. For example, the network interface device may further protocol process the data and output the data to the network.

A template may be a buffer which is assigned to an software context. For example when PIO is being carried out by an application, one or more template(s) may be assigned to an application context. In the case where PIO is being carried out by an operating system, one or more template(s) may be assigned to an operating system context. In some embodiments a context may be a process or a thread carried out by software, for example application, operating system or a hypervisor driver.

An application may be, for example, user level software having one or more processes and/or threads. The template could hold one or more entire data transmission units, for example a frame such as an Ethernet frame. The template could for example be defined to only hold the payload data, or some other region of the packet. In one embodiment, software may write an one or more entire frame(s) of data to the template. This may be the case where an application just calls send( ) with payload data. The internals of the send( ) call may construct an entire frame. In another or further embodiment, the application may be provided an application programming interface (API) to update a template with editing operations. Through these operations, portions of the template can be populated. In this case, a subsequent send( ) may only need to transfer the headers.

In some embodiments the template may be a scratch pad memory. The scratch pad memory may be associated with a process that is requesting and/or carrying out a data transfer and in some examples the memory space in which the scratch pad resides may only be accessible to that process. When the process is not using the template for transmission it may access the template as a scratch memory. The scratch pad memory may be a high-speed memory internal to the network interface device and may be used for temporary storage of the transmission data. The data for transmission may be temporarily held in the scratch pad memory or template before being transmitted onto the network.

In some embodiments, the template may hold multiple frames. Descriptors may point at arbitrary offsets into the template, this may allow multiple outstanding transmits to be made, in order to sustain a high aggregate message rate. (In some embodiments, once a doorbell has been posted indicating a transmission, the software may not touch/re-use the template region referenced by the corresponding descriptor until after a transmit completion event has been received.) It may be possible to post multiple outstanding transmission requests to different regions of the same template corresponding to different Ethernet frames, as well as to regions of different templates.

In some embodiments, the template may comprise headers corresponding to lower layer protocol processing. The template may for example contain headers corresponding to a transport layer protocol and the data to be transferred may be transferred into the template. In some examples, the data to be transferred may have protocol processed for the upper protocol layers. The template may comprise a buffer. In some embodiments the template may comprise a maximum transmission unit sized buffer.

In one embodiment for PIO transfer the descriptor ring and doorbell may be used similarly to those as described in relation to FIG. 2. In this case however, the descriptor will point to a template on the network interface device instead of the packet buffers 211 of the host computing device. In an embodiment where both PIO and DMA are implemented, a DMA descriptor will point to the packet buffers 211 of the host computing device and a PIO descriptor will point to a template on the network interface device, however both types of descriptors may be written to the same descriptor ring. In some embodiments, an order in which packets appear on the Ethernet is the order in which they are pushed onto the ring regardless as to whether they are PIO or DMA. In some cases each of the PIO transfer mode and the DMA transfer mode may have their own descriptor ring.

In some embodiments, a descriptor ring may be used to control processing within in the network interface device. For example, the descriptor ring may be configured to store commands. This may be in addition to descriptors in some embodiments. The commands may be posted to the descriptor ring. The commands may control the behaviour and/or operation of the network interface device. For example the commands may control the behaviour of the NIC with respect to the processing of subsequent descriptors. Examples of such commands may include whether or not to calculate checksums, transmit segmentation offload and/or interrupt moderation.

For example, in some cases, a cut through transmit may take place. A cut-through transmit may bypass some protocol processing, for example by pass any IP checksum calculations carried out by the network interface device. A command may be posted to the descriptor ring indicating that a transmit cut through is to be initiated for PIO (or DMA) transfer. A further command descriptor could later be pushed to revert the mode to normal (non cut-through transmit) behaviour.

In some embodiments therefore, the data posted to the descriptor ring or queue may be a descriptor pointing to data in a template or a command indicating a change in behaviour of the network interface device.

FIG. 3 shows an example of a PIO mode of operation.

In PIO mode, a host may transfer data directly from a host to a peripheral device using load/store operations carried out by a host's CPU. For example, the data may be transferred over a PCIe bus. The data may be transferred through non-cacheable memory. In some embodiments, the PIO mode may be considered to be a low latency mode of data transfer.

FIG. 3 is a conceptual diagram of a host computing device 210 and network interface device 220 and method steps (1), (2) and (3) for implementing a PIO mode of operation.

The host computing device 210 of FIG. 3 comprises a descriptor ring 212, doorbell 213 and template 301. It will be appreciated that the descriptor ring 212 and the doorbell 213 may be similar to those described with reference to FIG. 2. The template 301 may be a region of memory that is memory mapped to the address space of the user-level process requesting the data transfer. For example, in some embodiments, the doorbell 213 and the template 301 may be regions of memory of the network interface device and memory mapped to the user level process.

Doorbell 222 and template 301 shows the memory region of the network interface device 220 where the doorbell and template are stored, while the doorbells 213 and template 301 shows the memory mapping to the address space accessible by the user level process. It will however be appreciated that this is by of example only and the memory is mapped so that the user level process and the network interface device have access to shared memory.

In particular, the template 215 exists on the network interface 220 but is memory mapped to the address space of the user level process shown as template 301. The template may be owned by software running on the host computing device, for example the user level process or end-point. In some embodiments the template may be the size of a one or more maximum transmission unit (s), for example a transmission frame.

The template may for example hold multiple frames so that software can pipeline transmissions. If the buffer comprises only one frame it may have to wait for an event from the hardware after every send( ) before it is able to start writing the next frame.

The software (in some examples the user level process, operating system or hypervisor driver context) may have access to the template via the memory mapping as described above or any other appropriate means. The software may write data which is intended for transmission to the template 215 and form a descriptor pointing to the template 215 on the host computing device. The descriptor may be written by the software to the descriptor ring. The descriptor is then available to be read by the network interface device and to indicate to the network interface device that data for transmission is available in a template to which the descriptor points.

Each user level process (or other software carrying out PIO transfers) may be associated with one or more templates into which data may be written. A descriptor may point to the data in the template. The descriptor may identify the template to which the data was written and in some cases may include an offset when the data is written to only part of the template. For example a template may be the size of more than one transmission unit and the descriptor may identify the template as well as indicate where in the template the data was written to. In this manner, the network interface device may be made aware when new data is written to the template. In some embodiments the network interface device may determine whether data is ready for transmission, for example when one or more full transmission units have been written to a template.

A descriptor may indicate that a transmit should occur from a template pointed to by the descriptor. The descriptor may be processed by the network interface device. The descriptor could for example have been read from the descriptor ring, or have been included in the doorbell write.

It will be appreciated that the doorbell may provide an indication to the network interface device that descriptors are available in the descriptor ring in a similar manner as discussed in relation to FIG. 2. The PIO mode descriptors will however point to templates on the network interface device rather than packet buffers in the memory of the user process or host computing device.

The operation of the host computing device 210 and network interface device 220 of FIG. 3 is shown by steps (1), (2) and (3) of that figure.

At step 1, when data on the host device is available for transmission, the user level process may write that data to a template 215. The user level process (or other software) may write the data using programmed input/output. For example load/store operations may be carried out by the CPU of the host computing device to write the data to the template on the network interface device.

At step 2, a descriptor is written to the descriptor ring 212. The descriptor points to or references the template 215 and optionally an offset to which the data was written via PIO. It will be appreciated that the template may be associated with the descriptor ring. The descriptor may be written to the descriptor ring as soon as the PIO write to the template is initiated. In other words, the descriptor need not be written only when the PIO operation is complete, however in some cases this may be the case.

At step 3 a doorbell is written to the doorbell 222 via the memory mapping 213. It will be appreciated that this may be similar to the doorbell of FIG. 2. The doorbell indicates or identifies to the network interface device that a descriptor ring contains descriptors that need to be serviced. It will be appreciated that the doorbell may be written to with a first descriptor of the descriptor ring. In this case, the network interface device may begin servicing the first descriptor while it accesses further descriptors from the descriptor ring to service them.

The network interface device may respond to a doorbell being written by processing the descriptor ring (if necessary as the doorbell may have included the first descriptor) and accessing the packet data from the template pointed to by the descriptor.

In some embodiments the doorbell and descriptor ring may be combined. For example, a descriptor written to a queue may indicate to the network interface that data is available and the descriptor may be available to the network interface accessing the queue. This may be of interest for example when small amounts of data are being transferred.

In DMA mode and/or in PIO mode, the network interface device may indicate that a packet has been transmitted via an event notification. The event notification may also indicate that a packet buffer (in the case of DMA mode) or a template (in the case of PIO) is available to be re-used.

It will be appreciated that in some embodiments a data processing system may implement both DMA and PIO modes of data transfer. FIG. 4 shows an example of both modes being available in a data processing system.

FIG. 4 comprises a host computing device 210 and a network interface device 220. The host computing device 210 may run one or more user level processes, operating system and/or hypervisor driver contexts. Software running on the host may have access to packet buffers 211 and a transmit descriptor ring 212 in the host memory and memory mappings 213 and 301 to a doorbell 222 and template 215 of the network interface device 220. The network interface device 220 may a processing pipeline 223, a doorbell 222 and templates 215. The doorbell 223 and the templates 215 may be memory mapped to the memory of the host computing device.

The data processing system of FIG. 4 may carry out a DMA mode of data transfer by direct memory accessing data in the packet buffers 211 or a PIO mode of operation by PIO accessing the template 215. Both modes of operation may make use of the descriptor ring 212 and the doorbell 213. In particular, when data is written to the packet buffers 211 in a DMA mode, a descriptor pointing to the packet buffers 211 may be written to the descriptor ring. When data is written to the template using PIO, a descriptor pointing to the template on the network interface device may be written to the descriptor ring 212.

In this dual mode of operation, the descriptors to the templates may be interleaved with descriptors to the packet buffers in a descriptor ring. In this embodiment, the order in which the data frames (for example comprised of the data packets) are to be transmitted may correspond to the order in which the respective descriptors have been written to the descriptor ring. The network interface device will process the descriptors in the order in which they were posted (or written to) the descriptor ring. This is regardless of the mode used to carry out the data transfer.

In the foregoing, the doorbell has been described as being used to indicate that a descriptor ring contains descriptors which are to be serviced or processed. The doorbell may also identify a descriptor ring into which a descriptor has been posted. The descriptor rings contain descriptors pointing to a template or a packet buffer in accordance with the mode of data transfer used for that packet data.

It will be appreciated however that this is by way of example only. In some embodiments the data processing system may not contain both a doorbell and a descriptor ring, but instead a single queue into which descriptors may be posted. The queue will act as an indicator to the network interface device that a descriptor needs to be serviced as well as providing the descriptor to the network interface device. This queue may be suitable for some embodiments for example with a restricted amount of data transfer, as in some examples the queue may become full quickly.

In another embodiment, the doorbell may contain a first descriptor for a descriptor ring. For example, when a data transfer occurs for a packet data buffer or template associated with a descriptor ring (or user level process), a descriptor for that first transfer may be written to the doorbell. The network interface device may receive the descriptor and process the data pointed to by that descriptor. The network interface device may further access the descriptor ring and process any descriptors that may have been written there subsequently. The doorbell may therefore only be written to when the network interface device is not already busy accessing the descriptor ring.

It will be appreciated that the first descriptor need not be written to the doorbell, the doorbell may identify the descriptor ring with a descriptor written to it and the network interface device may access the descriptor from the descriptor ring in some embodiments.

The network interface device may receive an indication of a data to be transmitted and access a descriptor pointing to the data that is to be transmitted in a template. This indication may be received through a doorbell and the descriptor may be accessed from a descriptor ring. Alternatively the indication may comprise the descriptor.

It will be appreciated that in some embodiments the data transferred from the host computing device for transmission may include payload data. In some embodiments, the payload data may have been partially protocol processed. For example the data for transmission may have been processed in accordance with one or more upper layer protocols and may be lower layer protocol processed at the network interface device. In other embodiments, only the payload may be transferred. For example the data may be written to an application for transmission by a protocol like transmission control protocol (TCP).

The application may write for example 1000 bytes into a template. The protocol might dictate that only 500 bytes may be transmitted without receipt of an acknowledgement from the other side. It would be up to the protocol stack to decide how much and when to transmit. In some examples, the template may not be returned to the application for re-use until a TCP acknowledgement has been received to tell that the link partner has successfully received the data

The PIO mode, embodiments may make use of templates in the network interface device. In one embodiment, a first part of the template can be filled during a first data transfer and a second part of the template may be filled during a second data transfer. In some embodiments, the template may be filled in multiple writes. For example, if some or all of the packet data is known in advance of the required time to transmit, then host software can push this data in advance to the template. This data may be pushed using the CPU load/store operations in accordance with PIO. At the time of transmission, only the final portions of packet data need be transferred to the template.

Filling a template in two or more writes may for example be useful in financial service/trading applications. For example, an algorithm might wish to trade a large number of securities but the bid/ask spread might be moving. In these embodiments, a message to offer to trade may be pre-written—this may be for example a packet based on the financial information exchange (FIX) protocol over TCP and would include details such as the security and the offer. At some later time, following receipt of market data the number of shares to initially offer and the price would be determined. At that point the trade message may be completed and transmitted with the least possible delay.

As described above, once a packet has been transmitted by the network interface device, the network interface device sends an event notification indicating that the template is available for reuse. The transmitted packet will remain in the template until it is overwritten by a subsequent data transfer.

In this case, it is possible to reuse parts of the packet already in the template. For example, if only some of the information in the packet needs to be updated, those parts may be written to the respective parts of the template. The entire packet data need not be re-written. Packet differences between a previously transmitted and currently to be transmitted packet may be pushed to the template for transmission. In some embodiments, this may result in a reduction of data required to traverse the 10 bus and may reduce latency.

In another embodiment, the network interface device may be required to perform a unicast fan-out function in transmission. A unicast fan out function may comprise delivering or transmitting a single unicast message to a number of network endpoints. One method of carrying this out would be to carry out several message transmission, each addressed to a respective network end-point. In an embodiment of the present application, the template mechanism may be used.

In this embodiment, packet data may be written to the template once. As discussed, the packet will remain in the template after transmission until it is overwritten. Subsequent packets may be prepared for transmission by updating only the packet headers. The updated packet headers may reflect the respective destination end-points of the unicast fan out.

In this embodiment, data destined for more than one endpoint may be transferred to the template. The data in the template may be transmitted to a first endpoint. Packet headers corresponding to a second endpoint may then be pushed to the template. These packet headers to the second endpoint may overwrite packet headers corresponding to the first endpoint already in the template. The data in the template may then be transmitted to the second endpoint. It will be appreciated that this may be continued for any number of endpoints.

In some embodiments the network interface may comprise a virtual network interface. In some embodiments the template may be accessed via a library, for example an OpenOnload library. The library may convert messages from a user level process to be used by a virtual network interface. Extensions to the library may be added to allow sockets to take advantage of the features of the templates. For example, applications accessing the network at the Portable Operating Systems Interface (POSIX) socket abstraction level may be enabled to take also advantage of some of the features.

It will be appreciated that in some embodiments, some of the network interface processing may occur in a kernel or kernel space or in the context of a hypervisor.

In some embodiments the template may include a number of fields, for example a header or payload data field. When updating the fields using a number of writes, a bus transaction may be required per field. In an alternative embodiment, a message may be sent to the network interface indicating for example the number of fields of the template to be updated and the offset and/or extent of each update. The update may for example be sent by a single or a set of contiguous bus transactions. The network interface may receive the bus transaction and unpack the fields according to the information in the bus transaction as well as the information in the message. For example the bus transaction may comprise a PIO data transfer from the host device. The network interface may unpack the data in the PIO data transfer into the template based on the information in the message.

A second embodiment of the present application is concerned with the transmission of data packets onto a network, for example, the network 103. The data transferred to the network interface device may form a data transmission unit to be transmitted onto the network. The data transmission unit may be, for example, a data frame and may comprise payload data encapsulated according to protocol layers.

In order to allow a receiving entity to confirm that a data transmission unit has been correctly received, the data transmission unit may include check data. One example of check data may be a checksum or hash sum. This may be an arbitrary sum computed from the digital data. The checksum may be inserted into the data transmission unit before or during transmission. If an error has occurred in the transmission, a checksum calculated from the data received at a receiving entity will not match the checksum inserted into the packet.

In some data processing systems, a checksum is calculated for a data transmission unit and is inserted into the header of that data transmission unit. This however requires that the entire data transmission unit is available to a checksum calculator prior to the transmission of the data transmission unit. In order to do this, the data transmission unit is buffered prior to transmission. The transmission latency therefore includes this buffering latency.

As described with reference to the first embodiment, a descriptor to a template or a packet buffer may be made available to the network interface device as soon as the packet data begins to be stored in the packet buffer or the template. In the case of a DMA mode, the network interface device may start transmitting data from the processing pipeline while the remaining parts of the data packet are still being pulled from the packet buffer of the host computing device. While this may avoid the latency of having to buffer (store and forward) the whole packet, there is a risk that there may be a delay in the pulling of packet data from the packet buffer. In other words, a transmission into the Ethernet media access control (MAC) may be initiated but the frame may arrive at a slower rate than required in order to satisfy the transmission rate of the network. This is called a data under-run.

In some embodiments the risk of data under run may be reduced by using PIO mode of transfer as data may be available in the template before transmission, however in some situations, a pause in the availability of data may occur, for example due to memory bandwidth and/or internal network interface device contention for resources.

In these cases, software at the host (for example a user level process, application, operating system or hypervisor driver context) may have pre-calculated the checksum for the data transmission unit, for example the software may have bypassed the checksum offload engine by processing the checksum itself. The network interface hardware may only need to push the packet onto the wire or network as it is received from either host memory or the template. If (for example due to memory bandwidth pressure) there is a pause in the transmission the partial frame being transmitted onto the network cannot be halted and there is no further data to complete the transmission.

In embodiments of the present application, data forming a data transmission unit may be monitored as it is transmitted onto a network. If a pause is detected in the transmission of the data, for example a data under run condition is detected, the parts of the data transmission unit already transmitted may be stored and invalid data may be transmitted onto the network as part of the data transmission unit. The invalid data may corrupt the packet such that the packet is considered to be invalid by a receiving entity. For example, the (partial) data transmission unit may be corrupted by truncating the packet and inserting a bad checksum value (for example an Ethernet frame consecutive sequence (FCS)) at the end of the frame. In some embodiments, the data transmission unit may then be resent using the stored data and data of the data transmission unit that is subsequently made available.

The data may be transmitted as part of the network interface device pipeline. Once the network interface device has started a packet transmission, it keeps feeding packet data onto the network at the rate of network transmission. The hardware may pull the data to be transmitted from an ingress FIFO (in the example of DMA) or template (in the example of PIO) and push it to an egress FIFO and/or to an Ethernet MAC block. The hardware may detect an underflow when the ingress has no data. In this case it may, for example, export a data_ready signal. In one embodiment, a monitor may know that the transmission onto the network has experience a pause, for example has not been able to satisfy the MAC and should be aborted based on the data_ready signal. The monitor may continue to pull/discard the (now late) remainder of the frame and terminate the frame which has already been initiated at the MAC by adding a bad CRC and ending the transmission. The module may report to a front end DMA manager (in the case of DMA) that a frame has aborted so that the entire transaction can be repeated.

The monitor had been described as being separate to the hardware pushing data onto the network. It will however be appreciated that the monitor may form part of the hardware pushing data onto the network and/or may carry out the transmission of data onto the network itself. For example the functionality of the hardware and the monitor may be combined.

FIG. 5 shows an example of a data processing system 500 in accordance with the second embodiment.

The data processing system 500 comprises a host computing device 101, a network interface device 510 and a network 103. It will be appreciated that in some embodiments, the data processing system may implement aspects of the first embodiment.

The network interface device 510 may comprise a protocol processing engine 511 and a monitor 512. Optionally the network interface device 510 may comprise a network interface packet buffer 221 and a template 215, however it will be appreciated that data to be transmitted in the second embodiment may come from any suitable location.

Data to be transmitted may be passed through the protocol processing engine 511 and monitor 512 before being transmitted on to the network. It will be appreciated that the protocol processing engine may protocol process data to be transmitted to be in accordance with the lower layer protocols. For example the protocol processing engine may provide transport layer protocol processing, for example by calculating and providing checksum information. Alternatively a checksum for the packet may be calculated in software and added to the data transmission unit before transmission. It will however be appreciated that the protocol processing engine in embodiments is optional.

The monitor 512 may be configured to monitor the transmission of data transmission units onto the network and detect whether there is a pause in transmission. For example the monitor may determine whether there is a pause in the transmission indicative of a data under-run. This may be due to for example a memory bandwidth limitation. The monitor may, in response to a determined pause, insert invalid bits into the data as it is transmitted. The invalid bits are such that a receiving device would determine that the data transmission unit is corrupt and/or is invalid.

The invalid bit(s) in some embodiments may correspond to an invalid checksum value inserted into the packet. The partially transmitted packet may further be truncated and that transmission of the packet transmission unit ended. In some embodiments the data transmission unit may have been transmitted with a first checksum in its header. The monitor may generate a further checksum to be inserted into the tail of the packet. It will be appreciated that the tail may form the tail of the truncated packet. The checksum may in some examples be a frame consecutive sequence (FCS) checksum.

The monitor may further be configured to resend the data transmission unit as soon as any missing data in the data transmission unit is available. For example, the monitor may store the parts of the data transmission unit that have already been transmitted and then retransmit the data transmission unit using the stored part and subsequently received data of the data transmission unit.

FIG. 6 is a flow diagram depicting the method steps that may be carried out by the monitor 512.

At step 601, the monitor monitors the data being transmitted onto network. The data may be part of a data transmission unit. In some examples, the data transmission unit may comprise a header and payload data. The data transmission unit may for example include a first checksum. This checksum may be included in the data transmission unit head. The first checksum may have been generated by software.

At step 602 the monitors determines that there is a pause in the transmission of data. The pause may be indicative for example, a data under run condition.

At step 603, the data that has been transmitted onto the network is stored by the monitor. It will be appreciated that while this step is shown sequential to step 602, it may be carried out concurrently. In other words, data being transmitted may pre-emptively be stored at the monitor even if no under-run condition is determined.

At step 604, in response to the pause or data under-run condition being determined, the monitor may insert invalid data into the transmission that is forming the data transmission unit. In some embodiments, the monitor may insert a sequence of bit that are known to be invalid. The monitor may insert any data that will cause a receiving device to determine that a received data transmission unit is invalid or in error.

The invalid data may for example correspond to a checksum or cyclic redundancy check. For example a second check data in the packet. The checksum may be a frame check sequence (FCS) cyclic redundancy check (CRC). In some embodiments, step 604 may truncate the partially transmitted data transmission unit and insert the invalid checksum in a tail of the transmission unit.

In this manner, a data transmission unit is put onto the network even though not all of the data for the transmission unit is available. The data transmission unit placed onto the network may comprise invalid check data in the place of the data of the transmission unit that was not yet available.

At step 605, the monitor may retransmit the data transmission unit but this time include the data for the data transmission unit that has become subsequently available. A correct data transmission unit may be transmitted shortly after the data transmission unit containing invalid data.

It will however be appreciated that steps 603 and 605 may be optional. In some embodiments, retransmission of a data transmission unit may not be carried out. In other embodiments the retransmission of a data transmission unit may not be carried out by the monitor.

For example, the monitor may inform another entity that the data transmission unit was transmitted with invalid data. In this case, the other entity may initiate a retransmission of the data transmission unit. In one example, the monitor may inform a transmit TX DMA engine to retry the entire transaction. In this case, frames from other TX queues which would be following in the processing pipeline would not need to be paused while the invalid data transmission unit is retransmitted. However, in some cases, for a corrupted frame or data transmission unit, latency may increase because in some circumstances the data would be pulled again from host memory.

In some embodiments the monitor may insert the invalid check data in such a way that a receiving device such as another network interface card, host device and/or network switch determines that the packet is invalid or corrupted. For example, the data transmission unit may be corrupted in such a way that a next Layer 2 device, for example a network switch, will detect that the data transmission unit is corrupt and discard it in a link layer. In this case, the receiving device may not send a request for retransmission of the packet. The monitor may retransmit the packet as soon as the remaining data of the packet is received. The monitor may transmit the data transmission unit while bypassing any need to send a retransmission request.

It will be appreciated that the monitor which may be a monitor, monitoring means or monitoring device may form part of the network interface device hardware in some embodiments. The monitor may form part of the hardware for the transmission of data onto the network in that it may be a modification to such hardware, Alternatively the monitor may be provided in addition to such hardware, The monitor may for example have access to a memory in some embodiments. In some embodiments, the monitor may make a determination in hardware. In other embodiments, the monitor may be implemented in software. For example the monitoring may be in accordance with instructions stored on a computer readable medium and carried out on a dedicated or generic processing device. In this case, the monitor may be implemented in software on the network interface device, for example embedded on the network interface device.

Embodiments of the present application may be implemented in a data processing system comprising a host computing device and a network interface device. The network interface device may be configured to couple the host computing device to a network.

While the foregoing has outlined embodiments of the present application directed to the transfer of data from the host device to the network interface device and the transmission of data onto the network, the network interface device may be configured to carry out further functionality.

Potential further functionality of the data processing system will now be described however it will be appreciated that such further functionality is optional and is not limiting to the embodiments as described above.

Further aspects and functionality of the present application may include the replication and switching of multicast packet flows (depicted in FIGS. 7 and 8), microburst resiliency through unified switch architecture, scalable address translation (as depicted in FIG. 9), timestamping and virtualisation (as depicted in FIG. 10).

FIGS. 7 and 8 show examples of the replication and switching of multicast packet flows.

FIG. 7 comprises a first user level process 701 a, a second user level process 701 b and a network interface device. The first user level process may comprise an application 705 a and an application programming interface (API) socket 702 a. A socket may be considered to be an endpoint in a network communication. An API may allow and application to generate and use network sockets in the network communication. The socket API (702 a) may be coupled to a socket library 703 a. The socket library 703 a may be configured to for example provide user level protocol processing. The library may for example further provide transmit and receive descriptor rings and a notification queue that may be used for communication with the network interface device 710.

It will be appreciated that the second user level process 701 b may be similar to the first user level process 701 a.

The network interface device 710 may comprise network ports 712 through which data may be received from the network as well as a switch 711.

In the example of FIG. 7, the independent threads may subscribe to a same multicast flow. For example the first user level process and the second user level process may both be subscribed to a first multicast flow 713 arriving from the network. In some previous systems, host software may have been required to copy such flows to the different application threads, for example using the OpenOnload stack sharing mechanism. However in the present application, this operation may be performed entirely within the network interface device. In some cases this may result in the elimination of software copies and any inter-process synchronization.

FIG. 7 shows an internet protocol (IP) multicast flow 713 which has been subscribed to by two distinct user-level processes 701 a and 701 b. Each process 701 a, 701 b may be linked with a socket library 703 a, 703 b, for example the libonload.so protocol library. The library, during the handling of a multicast join operation, may insert a filter at the network interface device 710 to request the IP flow 713 be delivered to its receive descriptor ring. For each installed filter, the network interface device may replicate the incoming frames of the flow and deliver independently to each of the receive rings of the subscribes user level processes.

For example, in FIG. 7, the multicast flow 713 is replicated at the switch 711 at the network interface device. Each copy of the multicast flow is delivered to a respective subscribed process. For example a first copy 714 of the flow is delivered to the first user level process 701 a and a second copy 715 of the flow is delivered to the second user level process 701 b.

The switch 711 may carry out switching to replicate the multicast flow 713. This switching feature is fully symmetric. In other words, the switching feature may deal equally with multicast flows originating from a user level process running on a host computing device 720 of the data processing system. This may be seen for example in FIG. 8. It will be appreciated that the features of FIGS. 7 and 8 may be similar and like numerals have been used to indicate like.

In FIG. 8, frames arriving at the network interface device from a transmitting process 701 a on the same host as a consuming application 701 b may be replicated and switched both onto the physical Ethernet port as well as back to the host 720. The operation may take place without any software cross-talk between the applications 701 a, 701 b. Filtering operations may be specified flexibly from any of the frame header bits in some examples. This would allow for example, applications to subscribe to multicast feeds which differ only by VLAN.

For example, the first user level process 701 a may generate a multicast flow 801 which may be switched at the network interface device 710 to be transmitted to a subscribed user level process 701 b on the same host computing device 720 as the first user level process 701 a as well as onto the network 802 for subscribed processes on other devices.

A further aspect may be concerned with microburst resiliency.

The network interface may be configured to behave as a non-blocking switch fabric with fully virtualized internal buffer management. This may allow all of the data-path buffer memory within the network interface device to be efficiently and flexibly managed, for example to address the demands of all the physical and virtual ports of the device. For example, consider the scenario of a heavy burst of traffic arriving on a port and (perhaps due to host memory bandwidth limitations) which cannot be delivered to the host at line-rate. In this case, in one example one port may be allowed to use buffering that may be transiently available because another port is relatively idle. The scheduling decisions regarding the allocation of the buffers may be fully under the network interfaces firmware control, enabling memory management algorithms to be deployed. The network interface may in some examples be able to deliver to the host at a sustained data-rate greater than 60 Gb/s. This may along with the shared buffering resources, may in some cases address resilience during peak traffic conditions.

Some further aspects may relate to scalable address translation.

Address translation may be used to protect the integrity of a shared address space. In this aspect, system integrity may be taken into account while providing unprivileged address space access to direct memory access (DMA) capable virtualized hardware. In this aspect an address translation service (ATS) is supported between application virtual memory and the PCIe bus physical addresses required by the network interface device for DMA operations. This function may be provided with mature driver support.

In some address translation services, each address translation entry may for example map a 4 KB or 8 KB page size. This may enable a fine grained scatter gather operation however, the small page size may consume a large number of address translation service (ATS) entries within the network interface device (for example 30 K per Onload stack instance) in some cases. Exhaustion of the ATS (which may in some examples also be known as a buffer table) resource then has to be taken into account. If no ATS entries are available, the library may be unable to allocate DMA coherent buffers and may resort to processing network flows via kernel resources and therefore with reduced performance.

FIG. 9 comprises a user level process 901, which may be supported by an operating system of a host computing device, and a network interface device 910. The user level process may for example also include descriptor rings, notification queue and doorbells in accordance with some embodiments. The user level process 901 may further comprise huge page packet buffers 902. The network interface device may for example include filters 912, a network interface processing pipeline 913 and a buffer table 911. It will be appreciated that the filters may be optional. The buffer table 911 may contain entries mapping the address space to the packet buffers 902 which may be huge page packet buffers.

FIG. 9 shows and example of a network interface device that is able to map up to 4 MB of address space per entry in the buffer tables. When used in conjunction with Huge Page operating system support, each ATS entry may map onto a large number of maximum transmission unit (MTU) sized buffers. In some cases, this may for example enable a 50-100× increase in the number of Onload library stacks which can be allocated concurrently per host.

It will be appreciated that in some aspects, the network interface device may operate with a high speed internal data path and may be compatible with PCIe 3.0 bus speeds.

With respect to timestamping, the network interface device may timestamp every packet on ingress or egress at the Ethernet MAC interface. The Ethernet MAC interface may interface the network interface device with the network. The network interface device may include a temperature compensated oscillator (TCXO) which may enable these timestamps to be taken with high precision. Timestamp information may be carried through the network interface device data-path as meta-data, through the internal switch fabric through to the micro-engines which may be responsible for packet dispatch and notification reporting. The timestamp information may be presented to host software either conventionally, as part of the descriptor completion events, or alternatively by insertion into the Ethernet frame itself.

In some examples, this timestamp feature may be used with a software daemon to synchronize the network interface device oscillator to a network master clock with high precision. As when used with the older generation network interface devices, driver support may be provided to also discipline the server's own oscillator to the network disciplined network interface device oscillator. This may enable accurate software time-stamping in some cases. The system oscillator may have much lower precision than the network interface device TXCO and so for many situations hardware based timestamps are preferable.

In some aspects a combination of the precise time stamping and packet replication features may be useful when used in conjunction with a SolarCapture application. In this application, packets which arrive at a host and are destined for application processing can be time-stamped in hardware and replicated, one copy being delivered to the application for processing, another copy being captured by the SolarCapture application. Rather than connecting a physical appliance, or configuring a SPAN-port on a switch, every server in the data-center may be provisioned as a capture appliance, right at the point that application processing is taking place.

In a further aspect the network interface device may have a mode of virtualization in which there is no hard distinction between drivers attaching to physical or virtual functions and that there is no requirement for a master driver in the system. All resource allocation and the entire network interface device control plane may be managed by the network interface device itself without there being any requirement for communication between device drivers. In some cases it multiple driver stacks, including virtualized driver stacks, may be supported.

In this aspect, each driver can request flow-filtering and other hardware resources directly from the network interface device and it may be possible for the example shown in FIG. 10, to run OpenOnload within a guest operating system in a virtualized environment. Each guest operating system may be completely independent from the other and received dedicated hardware resources to directly access the network. Using OpenOnload in this manner, both the hypervisor and the operating system may be bypassed, enabling performance while maintaining the manageability of a virtualized environment.

When used in this manner, network flows may be processed by OpenOnload within a guest with only slight performance degradation compared with running in a bare-metal configuration. The switching capability of the network interface device may allow broadcast/multicast traffic to be replicated in some cases where necessary for the guest operating systems.

FIG. 10 shows a hypervisor 1001 with a first guest operating system 1002 and a second guest operating system 1003. Each of the guest operating systems may comprise a user space 1004 and a kernel 1005 with a driver 1006. The hypervisor 1001 may further comprise a hypervisor driver/stack 1007. The hypervispr may be coupled to a network interface device 1008. The network interface device may support physical and virtual functions for the first guest operating system 1009 a, the hypervisor driver/stack 1007 and the second guest operating system 1009 c. The requests for resources, for example the flow filtering, can be seen at 1010 a, 1010 b and 1010 c.

It will be appreciated that the network interface device may be implemented for example by an application specific integrated circuit (ASIC). In some examples the network interface device may be a network adaptor, network interface card and/or a network interface controller.

The applicant hereby discloses in isolation each individual feature described herein and any combination of two or more such features, to the extent that such features or combinations are capable of being carried out based on the present specification as a whole in the light of the common general knowledge of a person skilled in the art, irrespective of whether such features or combinations of features solve any problems disclosed herein, and without limitation to the scope of the claims. The applicant indicates that aspects of the present invention may consist of any such individual feature or combination of features. In view of the foregoing description it will be evident to a person skilled in the art that various modifications may be made within the scope of the invention. 

1. A method comprising: monitoring data being transmitted onto a network; detecting a delay in the transmission of the data; and inserting invalid check data into the data.
 2. The method of claim 1, wherein the data being transmitting onto the network is a data transmission unit.
 3. The method of claim 2, wherein the delay in the transmission is detected after a first part of the data transmission unit has been transmitted onto the network.
 4. The method of claim 3, wherein the method comprises inserting invalid check data into a tail of the first part of the data transmission unit.
 5. The method of claim 4, wherein the first part of the data transmission unit comprises further check data.
 6. The method of claim 3, wherein the method further comprises: storing the first part of the data transmission unit; and retransmitting the data transmission unit when a second part of the data transmission unit is received.
 7. The method of claim 2, comprising, in response to detecting the delay in the transmission of the data, truncating the data transmission unit so that the data transmission unit is only partially transmitted.
 8. The method of claim 2, wherein the method comprises: in response to detecting the delay in the transmission of the data, sending an instruction to an entity to retransmit the data transmission unit.
 9. The method of claim 8, wherein the entity comprises a transmit direct memory access engine.
 10. The method of claim 1, wherein the check data comprises at least one of: a checksum and a hash sum.
 11. The method of claim 10, wherein the check data comprises a frame consecutive sequence checksum.
 12. The method of claim 1, comprising: receiving a descriptor identifying a buffer comprising the data for transmission onto the network; and commence transmitting data from the buffer onto the network in response to receipt of the descriptor.
 13. The method of claim 12, wherein the buffer is part of a network interface device configured to transmit the data onto the network.
 14. The method of claim 12, wherein the buffer is part of a host computing device configured to transmit the data onto the network.
 15. The method of claim 1, wherein the delay in transmission indicates a data under run condition.
 16. An apparatus comprising at least one processor configured to: monitor data being transmitted onto a network; detect a delay in the transmission of the data; and insert invalid check data into the data.
 17. The apparatus of claim 16, wherein the data being transmitting onto the network is a data transmission unit.
 18. The apparatus of claim 17, wherein the delay in the transmission is detected after a first part of the data transmission unit has been transmitted onto the network.
 19. The apparatus of claim 18, wherein the at least one processor is configured to insert the invalid check data into a tail of the first part of the data transmission unit.
 20. A non-transitory computer readable medium comprising computer readable instructions which when executed by at least one processor cause an apparatus at least to: monitor data being transmitted onto a network; detect a delay in the transmission of the data; and insert invalid check data into the data. 